import request from '@/axios'
import type { CartListParams, CartWithProductInfo } from '../types'
// 购物车列表
export const getCartListWithProductInfo = (params: CartListParams) => {
  return request.get<{ data: CartWithProductInfo[] }>({
    url: '/cart/pageListWithProductInfo',
    params
  })
}
//后台删除购物车
export const deleteCart = (cartId: number) => {
  return request.post({ url: `/cart/delete/${cartId}` })
}
